#pragma once

#include<stdio.h>

#define NONE_FLUSH (1<<1)
#define LINE_FLUSH (1<<2)
#define FULL_FLUSH (1<<3)
#define SIZE 1024
typedef struct _myFILE
{
	//char inbuffer[];
	char outbuffer[SIZE];
	int pos;
	int cap;
	int fileno;
	int flush_mode;

}myFILE;

myFILE *my_fopen(const char *pathname,const char *mode);
int my_fwrite(myFILE *fp,const char *str,int size);
void my_close(myFILE *fp);
void my_flush(myFILE* fp);

